package com.safeluck.floatwindow;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * aaa
 * Created by lzw on 2018/10/12. 15:13:06
 * 邮箱：632393724@qq.com
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class ResponseVO implements Parcelable {
    private int type;//0-luxiang 1-推流 2-文件名类型（在message里面就是文件名）
    private String message;//提示信息
    private int errCode;//0-成功（正在推流或正在录像）   1,没有外置sd卡 2.长时间断网 3.短时间断网和网络切换 4.推流结束、或录像结束 -1usbCamera打不开,6-usbCamera实际使用的分辨率（包含在message） 7Dev（本机摄像）分辨率 8.录像时长  5-录像片段结束  err:-3 msg:SystemError

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.type);
        dest.writeString(this.message);
        dest.writeInt(this.errCode);
    }

    public ResponseVO() {
    }

    protected ResponseVO(Parcel in) {
        this.type = in.readInt();
        this.message = in.readString();
        this.errCode = in.readInt();
    }

    public static final Parcelable.Creator<ResponseVO> CREATOR = new Parcelable.Creator<ResponseVO>() {
        @Override
        public ResponseVO createFromParcel(Parcel source) {
            return new ResponseVO(source);
        }

        @Override
        public ResponseVO[] newArray(int size) {
            return new ResponseVO[size];
        }
    };

    @Override
    public String toString() {
        return "ResponseVO{" +
                "type=" + type +
                ", message='" + message + '\'' +
                ", errCode=" + errCode +
                '}';
    }
}
